package com.kehutong.contact.enums;

import org.coraframework.util.HashID;

/**
 * 客户状态
 *
 * @Author: liu jin Hwang
 */
public enum CustomerStatus implements HashID {

    LEARN_PRODUCTS("1", "了解产品"),
    FOLLOWING_UP("2", "正在跟进"),
    TRYING("3", "正在试用"),
    READY_TO_BUY("4", "准备购买"),
    PREPARE_PAYMENT("5", "准备付款"),
    ALREADY_PURCHASED("6", "已经购买"),
    LAY_ASIDE("7", "暂时搁置");

    private final String id;
    private final String desc;

    private CustomerStatus(String id, String desc) {
    	this.id = id;
        this.desc = desc;
    }

    public static CustomerStatus get(String desc) {
        CustomerStatus[] customerStatuses = values();
        for (CustomerStatus customerStatus : customerStatuses) {
            if (customerStatus.getDesc().equals(desc)) {
                return customerStatus;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }
    

	@Override
    public String getDesc() {
        return desc;
    }
    
}
